﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;

[TestClass()]
public class StudentTest
{
    [TestMethod()]
    [ExpectedException(typeof(ArgumentException))]
    public void EmptyNameStudentCreate()
    {
        string name = "";
        int fn = 12120;
        new Student(name, fn);
    }

    [TestMethod]
    [ExpectedException(typeof(ArgumentException))]
    public void FNOutOfRange()
    {
        string name = "";
        int fn = 9999;
        new Student(name, fn);
    }

    [TestMethod]
    public void BorderFNCase()
    {
        string name = "Kristian";
        int fn = 10000;
        new Student(name, fn);        
    }

    [TestMethod]
    public void NamePropertyTest()
    {
        string name = "Petur Subev";
        int fn = 23236;
        Student pesho = new Student(name, fn);
        Assert.AreEqual("Petur Subev", pesho.Name);
    }
    
    [TestMethod]
    public void GetFNPropertyTest()
    {
        string name = "Petur SUbev";
        int fn = 23236;
        Student pesho = new Student(name, fn);
        Assert.AreEqual(23236, pesho.Fn);
    }

    [TestMethod]
    [ExpectedException(typeof(ArgumentException))]
    public void FNGreaterThanRange()
    {
        string name = "Dimitar";
        int fn = 999999;
        new Student(name, fn);
    }

    [TestMethod]
    [ExpectedException(typeof(ArgumentException))]
    public void FNLesserThanRange()
    {
        string name = "Stancho";
        int fn = 9999;
        new Student(name, fn);
    }

    [TestMethod]
    [ExpectedException(typeof(ArgumentException))]
    public void LongNameTest()
    {
        string name = "This is one really really long name for testThis is one really really long name for test";
        int fn = 45678;
        new Student(name, fn);
    }

    [TestMethod]
    [ExpectedException(typeof(ArgumentException))]
    public void NullNameTest()
    {
        string name = null;
        int fn = 999999;
        new Student(name, fn);
    }
}

